<?php

namespace App\Console\Commands;

use App\Services\PaymentService;
use Illuminate\Console\Command;

class HandleTopUpOrderPayment extends Command
{
    /**
     * 命令名称及签名
     *
     * @var string
     */
    protected $signature = 'utils:handle_top_up_order_payment {plat_pay_id} {channel}';

    /**
     * 命令描述
     *
     * @var string
     */
    protected $description = '主动处理分账通充值订单';

    public function handle()
    {
        $this->output->success((int) (new PaymentService())->handleFztPaymentTopUp(
            $this->argument('plat_pay_id'),
            null,
            [],
            $this->argument('channel')));
    }
}
